package com.ym521.facecheck.camerax

import androidx.camera.core.ImageAnalysis
import androidx.camera.core.ImageProxy
import com.ym521.facecheck.FaceCheck


/**
 *@author Ym
 *E-mail: 2435970206@qq.com
 *createTime:2024/6/8
 *explain:
 *
 */
class SimpleImageAnalyzer private constructor() : ImageAnalysis.Analyzer {

    companion object {
        fun build(): SimpleImageAnalyzer {
            return SimpleImageAnalyzer()
        }
    }


    override fun analyze(image: ImageProxy) {
        FaceCheck.faceCheck(image)
        image.close()
    }
}